﻿CREATE VIEW spm.SsasPartitionDefinitions
AS 
/*
 * View to support the SSAS Partition Manager.  See https://SsasPartitionManager.codeplex.com/documentation for full documentation.
 *
 * Part of the SSAS Partition Manager sample code which can be downloaded from https://SsasPartitionManager.codeplex.com/
 * 
 * Written by Dr. John Tunnicliffe, independent business intelligence consultant
 * Available for consultancy assignments and speaking engagements
 * 	
 * eMail: john@decision-analytics.co.uk 
 * http://www.decision-analytics.co.uk/
 * http://www.sqlbits.com/Speakers/Dr_John_Tunnicliffe
 * https://www.linkedin.com/in/drjohntunnicliffe
 */ 
SELECT 
	C.SsasDatabaseName,
	C.SsasModelType,
	B.SsasCubeName,
	A.SsasMeasureGroupName,
	A.PartitionPeriod,
	A.PartitionStartDate,
	A.DateColumnName,
	A.DateColumnDataType,
	A.PartitionSliceIsRange
FROM spm.SsasMeasureGroup A
	JOIN spm.SsasCube B ON
		A.SsasCubeKey = B.SsasCubeKey
	JOIN spm.SsasDatabase C ON
		B.SsasDatabaseKey = C.SsasDatabaseKey;
GO

